<?php

/**
 * params.php
 *
 * Holds frontend specific application parameters.
 * @author Tuong Tran <tuong.tran@outlook.com>
 */
$paramsCommonFile = ROOT . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'params.php';

$paramsCommonArray = file_exists($paramsCommonFile) ? require($paramsCommonFile) : array();

return CMap::mergeArray(
		$paramsCommonArray,
		// merge frontend specific with resulting env-local merge *override by local
		array(
	    'url.rules' => array(
		'' => 'site/index',
		/* for REST please @see http://www.yiiframework.com/wiki/175/how-to-create-a-rest-api/ */
		/* other @see http://www.yiiframework.com/doc/guide/1.1/en/topics.url */
		'page/<alias:[\w-]+>' => '/site/page',
		'<controller:\w+>/<id:\d+>' => '<controller>/view',
		'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
		'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
		'<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
		//
		'about' => 'site/page/id/1',
		'FAQ' => 'site/page/id/9',
		'terms_&_conditions' => 'site/page/id/10',
		'privacy_policy' => 'site/page/id/11',
		'dashboard' => 'post/list_post/type/dashboard',
		'contact' => 'site/contact',
		'my_post' => 'post/my_post',
		'product/' => 'product/list_product/id/1',
	    ),
	    // add here all frontend-specific parameters
	    'pageSize' => 10
		)
);